﻿<%@ Page Language="C#" MasterPageFile="~/master.Master" AutoEventWireup="true" CodeBehind="RelatedInfoManager.aspx.cs"
    Inherits="CaseStudy.AdminPortal.RelatedInfoManager" %>

<%@ Register Src="~/UserControl/LoginInfo.ascx" TagName="LoginInfo" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <uc1:LoginInfo ID="loginInfo" runat="server" />
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div class="SiteMap">
        <div class="MapItem"><a href="Default.aspx" target="_self">首页</a></div>
        <div class="MapItem">/</div>
        <div class="CurrentMapItem">相关信息管理</div>
    </div>
    <div class="RelatedInfoContent">
        <div class="RelatedInfoTitle">相关信息：</div>
        <div class="NewCaseStudy">
            <asp:ImageButton ID="imgBtnNew" runat="server" CausesValidation="false" ImageUrl="images/Button_New.png"
                OnClick="imgBtnNew_Click" />
        </div>
        <div class="RelatedInfoGrid">
            <asp:GridView ID="gvRelatedInfo" runat="server" AllowPaging="true" AutoGenerateColumns="false"
                CellPadding="6" GridLines="Both" OnRowCommand="gvRelatedInfo_RowCommand" onpageindexchanging="gvRelatedInfo_PageIndexChanging">
                <FooterStyle Font-Bold="true" />
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                        <ItemTemplate>
                            <asp:LinkButton ID="linkBtnView" runat="server" Text='<%# Container.DataItemIndex +1%>'
                                CommandName="View" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID") %>'></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="30px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Title" HeaderText="名称">
                        <ItemStyle CssClass="GridTextField" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Url" HeaderText="地址">
                        <ItemStyle CssClass="GridTextField" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="全局">
                        <ItemTemplate>
                            <asp:Label ID="lblGlobal" runat="server"><%# Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsGlobal")) ? "是" : "否"%></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="30px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="CreateTime" HeaderText="创建时间">
                        <ItemStyle Width="91px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ModifyTime" HeaderText="修改时间">
                        <ItemStyle Width="91px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:ImageButton ID="imgbtnEdit" runat="server" ImageUrl="images/Button_Edit.png"
                                CommandName="Edit" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID") %>' />
                            <asp:ImageButton ID="imgbtnDelete" runat="server" ImageUrl="images/Button_Delete.png"
                                CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID") %>' OnClientClick="javascript:return DeleteCheck();"  />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center"  Width="120px"/>
                    </asp:TemplateField>
                </Columns>
                <PagerStyle HorizontalAlign="Center" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>